/*
 * @Author: tcosfish
 * @Date: 2022-07-25 09:25:27
 * @LastEditors: tcosfish
 * @LastEditTime: 2022-08-03 10:02:53
 * @FilePath: \loadFile\src\config\database.config.ts
 */
import * as path from "path"

import "reflect-metadata"
import { DataSourceOptions } from "typeorm"

const entities_path = path.join(__dirname, "/../database/entities/*.ts")
const views_path = path.join(__dirname, "/../database/views/*.ts")

export const DataSourceConfig: DataSourceOptions = {
  type: "mysql",
  host: "localhost",
  port: 3306,
  username: "root",
  password: "123456",
  database: "ry-test",
  synchronize: true,
  logging: false,
  entities: [entities_path, views_path],
}
